package com.ruoyi.statistic.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.statistic.mapper.WMonthEnterWarehouseStatMapper;
import com.ruoyi.statistic.domain.WMonthEnterWarehouseStat;
import com.ruoyi.statistic.service.IWMonthEnterWarehouseStatService;

/**
 * 月入库量Service业务层处理
 * 
 * @author wzy
 * @date 2024-09-01 18:17:47
 */
@Service
public class WMonthEnterWarehouseStatServiceImpl implements IWMonthEnterWarehouseStatService 
{
    @Autowired
    private WMonthEnterWarehouseStatMapper wMonthEnterWarehouseStatMapper;

    /**
     * 查询月入库量
     * 
     * @param monthEnterStatisticId 月入库量主键
     * @return 月入库量
     */
    @Override
    public WMonthEnterWarehouseStat selectWMonthEnterWarehouseStatByMonthEnterStatisticId(Long monthEnterStatisticId)
    {
        return wMonthEnterWarehouseStatMapper.selectWMonthEnterWarehouseStatByMonthEnterStatisticId(monthEnterStatisticId);
    }

    /**
     * 查询月入库量列表
     * 
     * @param wMonthEnterWarehouseStat 月入库量
     * @return 月入库量
     */
    @Override
    public List<WMonthEnterWarehouseStat> selectWMonthEnterWarehouseStatList(WMonthEnterWarehouseStat wMonthEnterWarehouseStat)
    {
        return wMonthEnterWarehouseStatMapper.selectWMonthEnterWarehouseStatList(wMonthEnterWarehouseStat);
    }

    /**
     * 新增月入库量
     * 
     * @param wMonthEnterWarehouseStat 月入库量
     * @return 结果
     */
    @Override
    public int insertWMonthEnterWarehouseStat(WMonthEnterWarehouseStat wMonthEnterWarehouseStat)
    {
        wMonthEnterWarehouseStat.setCreateTime(DateUtils.getNowDate());
        return wMonthEnterWarehouseStatMapper.insertWMonthEnterWarehouseStat(wMonthEnterWarehouseStat);
    }

    /**
     * 修改月入库量
     * 
     * @param wMonthEnterWarehouseStat 月入库量
     * @return 结果
     */
    @Override
    public int updateWMonthEnterWarehouseStat(WMonthEnterWarehouseStat wMonthEnterWarehouseStat)
    {
        wMonthEnterWarehouseStat.setUpdateTime(DateUtils.getNowDate());
        return wMonthEnterWarehouseStatMapper.updateWMonthEnterWarehouseStat(wMonthEnterWarehouseStat);
    }

    /**
     * 批量删除月入库量
     * 
     * @param monthEnterStatisticIds 需要删除的月入库量主键
     * @return 结果
     */
    @Override
    public int deleteWMonthEnterWarehouseStatByMonthEnterStatisticIds(Long[] monthEnterStatisticIds)
    {
        return wMonthEnterWarehouseStatMapper.deleteWMonthEnterWarehouseStatByMonthEnterStatisticIds(monthEnterStatisticIds);
    }

    /**
     * 删除月入库量信息
     * 
     * @param monthEnterStatisticId 月入库量主键
     * @return 结果
     */
    @Override
    public int deleteWMonthEnterWarehouseStatByMonthEnterStatisticId(Long monthEnterStatisticId)
    {
        return wMonthEnterWarehouseStatMapper.deleteWMonthEnterWarehouseStatByMonthEnterStatisticId(monthEnterStatisticId);
    }
}
